<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>后台管理 - 易买网</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css"/>
    <script type="text/javascript" src="/scripts/function-manage.js"></script>
</head>

<body>
<%@ include file="/WEB-INF/manage/common/head.jsp" %>
<%@ include file="/WEB-INF/manage/common/position.jsp" %>
<div id="main" class="wrap">
    <%@include file="/WEB-INF/manage/common/left.jsp" %>
    <div class="main">
        <h2>新闻管理</h2>
        <div class="manage">
            <table class="list">
                <tr>
                    <th>ID</th>
                    <th>新闻标题</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${newsPage.records}" var="news">
                    <tr>
                        <td class="first w4 c">${news.id}</td>
                        <td>${news.title}</td>
                        <td class="w1 c"><a href="/news/input?id=${news.id}">修改</a> <a
                                href="javascript:Delete('/news/delete?id=${news.id}');">删除</a></td>
                    </tr>
                </c:forEach>
            </table>
        </div>
    </div>
    <div class="pager">
        <ul class="clearfix">
            <li><a href="/news/list?current=${newsPage.hasPrevious()?newsPage.current-1:1}">上一页</a>
            </li>
            <c:forEach var="index" begin="1" end="${totalPage}" step="1">
                <li class="current"><a href="/news/list?current=${index}">${index}</a></li>
            </c:forEach>
            <li>
                <a href="/news/list?current=${newsPage.hasNext()?newsPage.current+1:totalPage}">下一页</a>
            </li>
        </ul>
    </div>
</div>
<div class="clear"></div>
</div>
<%@ include file="/WEB-INF/common/footer.jsp" %>
</body>
</html>
